package com.pkk.cloud.support.oauth2.princiapl.configuration;

import com.pkk.cloud.support.oauth2.princiapl.handle.UserPrincipalExtractor;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerTokenServicesConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author peikunkun<br>
 * @version V1.0<br>
 * @Title: 获取自定义token的用户信息<br>
 * @Description: <><br>
 * @date 2020/3/19 0019 下午 4:32<br>
 * @URL:[]
 */
@Configuration
@AutoConfigureBefore(ResourceServerTokenServicesConfiguration.class)
public class UserPrincipalExtractorConfiguration {

  @Bean
  public UserPrincipalExtractor userPrincipalExtractor() {
    return new UserPrincipalExtractor();
  }
}
